//Steve Mackey

package superConference;

import static org.junit.Assert.assertTrue;

import java.io.File;

import org.junit.Test;

public class PaperTest {
	File f = new File("/src/papers/bestPaper.txt");
	Paper testCase = new Paper(new Author(1, "test@example.com", "Test user"), "The Best Paper", f);

	@Test
	public void testPaper() {
		assertTrue(testCase.getAuthor() == "Mackey");
		assertTrue(testCase.getTitle() == "The Best Paper");
		assertTrue(testCase.getFile().equals(f));

	}

	@Test
	public void testSetTitle() {
		testCase.setTitle("Wilson's Follies");
		assertTrue(testCase.getAuthor() == "Wilson's Follies");
	}

	@Test
	public void testSetAuther() {
		testCase.setAuther("Wilson");
		assertTrue(testCase.getAuthor() == "Wilson");
	}


	@Test
	public void testSetText() {
		testCase.editFile(new File("/src/papers/bestPaper.txt"));
		assertTrue(testCase.getFile().equals(new File("/src/papers/bestPaper.txt")));
	}

}
